package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.CommonPhrases;
import com.zhijian.medical.entity.vo.request.CommonPhrasesSearchVo;
import com.zhijian.medical.entity.vo.response.CommonPhrasesVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CommonPhrasesMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CommonPhrases record);

    int insertSelective(CommonPhrases record);

    CommonPhrases selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CommonPhrases record);

    int updateByPrimaryKey(CommonPhrases record);

    /**
     * 查询总数
     *
     * @param commonPhrasesSearchVo
     * @return
     */
    int count(CommonPhrasesSearchVo commonPhrasesSearchVo);

    /**
     * 查询列表
     *
     * @param commonPhrasesSearchVo
     * @return
     */
    List<CommonPhrasesVo> selectList(CommonPhrasesSearchVo commonPhrasesSearchVo);

    /**
     * 查询单个
     *
     * @param commonPhrasesSearchVo
     * @return
     */
    CommonPhrasesVo selectOne(CommonPhrasesSearchVo commonPhrasesSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    CommonPhrasesVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param commonPhrasesSearchVo
     * @return
     */
    void deleteByCondition(CommonPhrasesSearchVo commonPhrasesSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<CommonPhrases> entities);

    /**
     * 根据ParentId查询列表
     *
     * @param parentId
     * @return
     */
    List<CommonPhrasesVo> selectListByParentId(Long parentId);
}